/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
 */

package com.huawei.exam;

import java.util.Arrays;

/**
 * @author z00611952
 * @since 2021/9/17
 */
public class MainTest {

    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5,6};
        // Arrays.stream(arr).forEach(System.out::println);
        remove(arr, 2);
        Arrays.stream(arr).forEach(System.out::println);

    }

    private static void remove(int[] marbles, int pos) {
        for (int i = pos; i < marbles.length - 1;i++){
            marbles[i] = marbles[i+1];
        }
    }
}
